package com.tyqx.hashchainbiz.service;

import com.mongodb.client.gridfs.GridFSBucket;
import com.mongodb.client.gridfs.model.GridFSUploadOptions;
import com.tyqx.hashchainbean.module.HashChainStatistics;
import com.tyqx.hashchainbean.vo.MongoDbInfoVO;
import org.apache.ibatis.annotations.Param;
import org.bson.types.ObjectId;

import java.io.InputStream;
import java.util.List;

public interface HashChainStatisticsService {

    public int add(HashChainStatistics hashChainStatistics);

    public List<HashChainStatistics> selectCount();

    public double selectCountByUserNameAndDataType(String userName, String dataType);

    public ObjectId insertDataCountAndMongoDBGridFS(HashChainStatistics hashChainStatistics, String fileName, InputStream inputStream, GridFSUploadOptions options,GridFSBucket gridFSFilesBucket)throws Exception;

    public void insertDataCountAndMongoDB(HashChainStatistics hashChainStatistics, String collName, MongoDbInfoVO mongoDbInfoVO) throws Exception;

    public List<HashChainStatistics> selectCountGroupByDataType();
}
